home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / giochi / boulderdäsh / install / boulderdäsh.install next >
Text File  |  1997-01-05  |  17KB  |  492 lines

  1. ; $VER: BoulderDäsh.install 3.00 (12.12.96)
  2. ; Install script for BoulderDäsh (Workbench 2.0 or higher)
  3. ;
  4. (COMPLETE 0)
  5. ;(USER 2)
  6. (SET #ApplicationName "BoulderDäsh")
  7. (SET #ApplicationDir "sys:")
  8. (SET #ArchiveDir "/")
  9. (SET #Language -1)
  10. (SET #Documents -1)
  11. (SET #ApplicationKeyfile (CAT #ApplicationName ".key"))
  12.  
  13. ;=============================================================================
  14. ; German strings
  15.  
  16. (IF (= @language "deutsch")
  17. (
  18. (SET default_lang 2)
  19.  
  20. (SET #bad-kick "Sie benötigen Workbench 2.0 oder größer")
  21. (SET #bad-installer
  22. (CAT "Achtung! Es ist eine alte Version des Programmes 'Installer' "
  23.      "auf Ihrem Amiga!\n\nDie Installation benötigt mindestens Installer 42.9.\n\n"
  24.      "Bitte überprüfen Sie Ihre Konfiguration!\n"
  25.      "Wenn Sie fortfahren, wird eine Vollinstallation vorgenommen, das heißt\n"
  26.      "es werden alle Kataloge,Anleitungen und die OS2.0+ Version installiert.\n"
  27.      "%s ist auch dann voll einsatzfähig!"
  28. ))
  29.  
  30. (SET #App-InstallMsg
  31. (CAT "\n\%s Installationsskript.\n"
  32.         "Diese Skript installiert %s auf Ihrem Amiga.\n\n"
  33.         "Lesen Sie das Anleitungs-File für weitere Informationen\n"
  34.         " über den Vertrieb von %s.\n\n"
  35.         "%s © 1995-96 Guido Mersmann\n"
  36.         "All Rechte reserviert."
  37. ))
  38.  
  39. (SET #App-Where
  40. (CAT "Wo möchten Sie %s installieren ?\n"
  41.         "(Ein Verzeichnis wird angelegt)"
  42. ))
  43.  
  44. (SET #App-Update
  45. (CAT "\nEin %s-Verzeichnis existiert im ausgewählen"
  46.         " Verzeichnis. Wenn Sie fortfahren,"
  47.         " bestätigen Sie, daß Sie die alte %s-Installation"
  48.         " mit der neuesten Version updaten wollen.\n"
  49.         "Verschiedene %s-Dateien (z.B Prefs) werden falls nötig überschrieben!"
  50. ))
  51.  
  52. (SET #App-Main "Welche Version von %s möchten Sie installieren?")
  53. (SET #App-Main-help
  54. (CAT "Die OS2.0+ Version läuft unter allen Systemen ab OS2.0."
  55.      " Die OS2.1+ Version hat den Nutzen, daß sie weniger Resourcen"
  56.      " benutzt, wenn sich %s im Hintergrund befindet. Dazu MUß"
  57.      " die Locale.library eingebunden sein. Für die OS3.0+ gilt das selbe"
  58.      " wie für die OS2.1 Verison. Es werden OS3.0+ Routinen benutzt, die"
  59.      " weiteren Speicher sparen."
  60. ))
  61.  
  62. (SET #App-Language "Welche Sprachen sollen installiert werden ?")
  63.  
  64. (SET #App-Language-help
  65. (CAT "\nDer Amiga kann in vielen verschiedenen Sprachen"
  66.          " arbeiten. Um Plattenkapazität zu sparen können Sie"
  67.          " nur die Sprachen anwählen, die sie benötigen"
  68.          " Haken Sie also einfach die Sprachen ab, die Sie"
  69.          " Ihrem System zugänglich machen wollen."
  70.           @askoptions-help
  71. ))
  72.  
  73. (SET #App-Docs "Welche Anleitungs- und Informationsdateien wollen Sie installieren ?")
  74.  
  75. (SET #startup-prompt    "Es müssen zu S:User-Startup einige Eintragungen für %s hinzugefügt werden:\n\n%s")
  76.  
  77.  
  78. (SET #App-Exit "\n%s installiert !!")
  79.  
  80.  
  81. ))
  82.  
  83. ;=============================================================================
  84. ; English strings
  85.  
  86. (IF (<> @language "deutsch")
  87. (
  88. (SET default_lang 4)
  89.  
  90. (SET #bad-kick "You must have at least Workbench 2.0+")
  91. (SET #bad-installer
  92. (CAT "You have an old version of the program 'Installer' "
  93.      "on your Amiga!\n\nThe installation procedure needs at least Installer 42.9.\n\n"
  94.      "Please check your configuration!\n\n"
  95.      "If you proceed the whole archive will be installed.\n"
  96.      "%s will work without any restrictions!"
  97. ))
  98.  
  99. (SET #App-InstallMsg
  100. (CAT "\n\%s installation script.\n"
  101.         "This script installs %s on your Amiga.\n\n"
  102.         "Read the DOK-file for more information\n"
  103.         " on the distribution of %s.\n\n"
  104.         "%s © 1995-96 Guido Mersmann\n"
  105.         "All rights reserved."
  106. ))
  107.  
  108. (SET #App-Where
  109. (CAT "Where would you like to install %s ?\n"
  110.         "(A drawer will be created)"
  111. ))
  112.  
  113. (SET #App-Update
  114. (CAT "\nA %s drawer does already exist in the selected "
  115.         " directory. By selecting \"Proceed\", you"
  116.         " indicate that you want to update the %s"
  117.         " installation with the most recent version.\n"
  118.         "Several %s specific files will be overwritten!"
  119. ))
  120.  
  121. (SET #App-Main "Which %s version should be installed ?")
  122. (SET #App-Main-help
  123. (CAT "The OS2.0+ version should only be used on Systems with OS2."
  124.      " The OS2.1+ and the OS3.0+ version need less Memory. Locale is required!"
  125.      " Special OS3.0+ functions are used to save more memory."
  126. ))
  127.  
  128. (SET #App-Language "Which languages should be installed ?")
  129. (SET #App-Language-help
  130. (CAT "\nThe Amiga can be operated in many different"
  131.           " languages."
  132.           "To reduce the amount of space consumed by the"
  133.           " language files, you can select to have only the"
  134.           " files of specific languages copied.\n\n"
  135.           "Simply check the boxes of the languages you wish"
  136.           " to have available on your system.\n\n"
  137.           @askoptions-help
  138. ))
  139.  
  140. (SET #App-Docs "Which Amiga-guide files should be installed ?")
  141.  
  142. (SET #startup-prompt    "Some lines need to be added to S:User-Startup for %s\n\n%s")
  143.  
  144. (SET #App-Exit "\n%s installed !!")
  145.  
  146.  
  147. ))
  148. ;----------------------------------------------------------------------------
  149. ;----------------------------------------------------------------------------
  150. ;    P_Requirements
  151. ;----------------------------------------------------------------------------
  152. ;----------------------------------------------------------------------------
  153. (PROCEDURE P_Requirements
  154. ; Workbench 37 or better required
  155. (IF (< (/ (getversion) 65536) 37)
  156. (
  157.   (abort #bad-kick)
  158. )
  159. )
  160. ; Installer 42.9 or better required
  161. (if (< @installer-version 2752521)
  162.   (
  163. (user 2)
  164.     (message (#bad-installer #ApplicationName))
  165.     (welcome)
  166.  
  167. ;---- Simple Copy all ask
  168. (SET #ApplicationDir
  169.         (TACKON
  170.                 (ASKDIR
  171.                         (PROMPT (#App-Where #ApplicationName))
  172.                         (HELP @askdir-help)
  173.                         (default #ApplicationDir)
  174.                 )
  175.                 #ApplicationName
  176.         )
  177. )
  178. (MAKEDIR #ApplicationDir (INFOS))
  179.                    (COPYFILES
  180.     (SOURCE "/")
  181.     (DEST #ApplicationDir)
  182.     (HELP @copyfiles-help)
  183.     (OPTIONAL <force>)
  184.     (ALL)
  185.     (INFOS)
  186.                    )
  187. (STARTUP #ApplicationName
  188.      (SET #dummy (cat "Path add Path " #ApplicationDir))
  189.       (HELP @startup-help)
  190.       (PROMPT (#startup-prompt #ApplicationName #dummy))
  191.       ;(COMMAND #dummy)
  192. )
  193.     (exit (quiet))
  194.   )
  195. )
  196. ) ;PROCEDURE
  197. ;----------------------------------------------------------------------------
  198. ;----------------------------------------------------------------------------
  199. ;    Ask for Catalogs
  200. ;----------------------------------------------------------------------------
  201. ;----------------------------------------------------------------------------
  202. (PROCEDURE P_AskCatalogs #Language
  203.  
  204. (SET #Dummy     (ASKOPTIONS
  205.                 (PROMPT #App-Language)
  206.                 (HELP #App-Language-help)
  207.                 (CHOICES
  208.                         "English"
  209.                         "Deutsch")
  210.                 (DEFAULT #Language)
  211.         )
  212. )
  213. ) ;PROCEDURE
  214. ;----------------------------------------------------------------------------
  215. ;----------------------------------------------------------------------------
  216. ;    Copy Selected Catalogs
  217. ;----------------------------------------------------------------------------
  218. ;----------------------------------------------------------------------------
  219. (PROCEDURE P_CopyCatalogs #Language
  220. (SET n 0)
  221. (SET #DestinationRoot (TACKON #ApplicationDir "Catalogs"))
  222. (SET #SourceRoot (TACKON #ArchiveDir "Catalogs"))
  223. (MAKEDIR #DestinationRoot)
  224.  
  225. (while (< n 2)
  226.         (SET #Dummy (SELECT n "english" "deutsch"))
  227.         (
  228.                 (IF (IN #Language n)
  229.                 (
  230.     (MAKEDIR (TACKON #DestinationRoot #Dummy))
  231.                         (COPYFILES
  232.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  233.                                 (DEST (TACKON #DestinationRoot #Dummy))
  234.                                 (HELP @copyfiles-help)
  235.                                 (ALL)
  236.                         )
  237.                 )
  238.                 )
  239.         )
  240. (SET n (+ n 1))
  241. )
  242. ) ;PROCEDURE
  243. ;----------------------------------------------------------------------------
  244. ;----------------------------------------------------------------------------
  245. ;    Ask for docs
  246. ;----------------------------------------------------------------------------
  247. ;----------------------------------------------------------------------------
  248. (PROCEDURE P_AskDocs #Documents
  249. (SET #Dummy             (ASKOPTIONS
  250.                         (PROMPT #App-Docs)
  251.                         (HELP @askoptions-help)
  252.                         (CHOICES
  253.                         "english"
  254.                         "deutsch"
  255.                         )
  256.                         (DEFAULT #Documents)
  257.                   )
  258. )
  259. ) ;PROCEDURE
  260. ;----------------------------------------------------------------------------
  261. ;----------------------------------------------------------------------------
  262. ;    Copy docs
  263. ;----------------------------------------------------------------------------
  264. ;----------------------------------------------------------------------------
  265. (PROCEDURE P_CopyDocs #Documents
  266. (SET n 0)
  267. (SET #DestinationRoot (TACKON #ApplicationDir "Docs"))
  268. (SET #SourceRoot (TACKON #ArchiveDir "Docs"))
  269. (MAKEDIR #DestinationRoot)
  270.  
  271. (while (< n 2)
  272.         (SET #Dummy (SELECT n
  273.         "english"
  274.         "deutsch"
  275.     )
  276.         )
  277.         (
  278.                 (IF (IN #Documents n)
  279.                 (
  280.     (MAKEDIR (TACKON #DestinationRoot #Dummy))
  281.                         (COPYFILES
  282.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  283.                                 (DEST (TACKON #DestinationRoot #Dummy))
  284.                                 (HELP @copyfiles-help)
  285.                                 (INFOS)
  286.                                 (ALL)
  287.                         )
  288.                 )
  289.                 )
  290.         )
  291. (SET n (+ n 1))
  292. )
  293. ) ;PROCEDURE
  294. ;----------------------------------------------------------------------------
  295. ;----------------------------------------------------------------------------
  296. ;    Copy_Dir (Dir)
  297. ;----------------------------------------------------------------------------
  298. ;----------------------------------------------------------------------------
  299. (PROCEDURE P_CopyDir #Dummy
  300.  
  301. (SET #DestinationRoot (TACKON #ApplicationDir #Dummy))
  302. (SET #SourceRoot (TACKON #ArchiveDir #Dummy))
  303. (MAKEDIR #DestinationRoot)
  304.  
  305.                    (COPYFILES
  306.     (SOURCE #SourceRoot)
  307.     (DEST #DestinationRoot)
  308.     (HELP @copyfiles-help)
  309.     (OPTIONAL <force>)
  310.     (ALL)
  311.     (INFOS)
  312.                    )
  313. ) ;PROCEDURE
  314. ;----------------------------------------------------------------------------
  315. ;----------------------------------------------------------------------------
  316. ;    Copy_File (Name)
  317. ;----------------------------------------------------------------------------
  318. ;----------------------------------------------------------------------------
  319. (PROCEDURE P_CopyFile #Dummy
  320.                    (COPYFILES
  321.     (SOURCE (TACKON #ArchiveDir #Dummy))
  322.     (DEST #ApplicationDir)
  323.     (HELP @copyfiles-help)
  324.     (OPTIONAL <force>)
  325.     (ALL)
  326.     (INFOS)
  327.                    )
  328. ) ;PROCEDURE
  329. ;----------------------------------------------------------------------------
  330. ;----------------------------------------------------------------------------
  331. ;    GetApplicationDir
  332. ;----------------------------------------------------------------------------
  333. ;----------------------------------------------------------------------------
  334. (PROCEDURE P_GetApplicationDir #Dummy
  335.  
  336. (SET #ApplicationDir
  337.         (TACKON
  338.                 (ASKDIR
  339.                         (PROMPT (#App-Where #ApplicationName))
  340.                         (HELP @askdir-help)
  341.                         (default #Dummy)
  342.                 )
  343.                 #ApplicationName
  344.         )
  345. )
  346. ) ;PROCEDURE
  347. ;----------------------------------------------------------------------------
  348. ;----------------------------------------------------------------------------
  349. ;    P_Update
  350. ;----------------------------------------------------------------------------
  351. ;----------------------------------------------------------------------------
  352. (PROCEDURE P_Update
  353. (if (= (exists #ApplicationDir) 2)
  354.         (message (#App-Update #ApplicationName #ApplicationName #ApplicationName))
  355. )
  356. ) ;PROCEDURE
  357. ;----------------------------------------------------------------------------
  358. ;----------------------------------------------------------------------------
  359. ;    P_AskBinary
  360. ;----------------------------------------------------------------------------
  361. ;----------------------------------------------------------------------------
  362. (PROCEDURE P_AskBinary
  363. (set #Dummy (/ (getversion) 65536))
  364.  
  365. (if (= #Dummy 37) (set #Binary 0))
  366. (if (= #Dummy 38) (set #Binary 1))
  367. (if (> #Dummy 38) (set #Binary 2))
  368.  
  369. (set #Binary (askchoice
  370.     (prompt (#App-Main #ApplicationName))
  371.     (help (#App-Main-help #ApplicationName))
  372.     (choices
  373.     "OS2.0+"
  374.                            "OS2.1+"
  375.                            "OS3.0+"
  376.                         )
  377.     (default #Binary)
  378.             )
  379. )
  380. ) ;PROCEDURE
  381. ;----------------------------------------------------------------------------
  382. ;----------------------------------------------------------------------------
  383. ;    P_CopyBinary
  384. ;----------------------------------------------------------------------------
  385. ;----------------------------------------------------------------------------
  386. (PROCEDURE P_CopyBinary #Dummy
  387.  
  388. (set #BinaryName (SELECT #Binary #Dummy (CAT "Bin/" #Dummy "_OS21") (CAT "Bin/" #Dummy "_OS30")))
  389. (copyfiles
  390.         (source (TACKON #ArchiveDir #BinaryName) (infos))
  391.         (dest #ApplicationDir)
  392.         (newname #Dummy)
  393.         (help @copyfiles-help)
  394.         (optional <force>)
  395. )
  396. ) ;PROCEDURE
  397. ;----------------------------------------------------------------------------
  398. ;----------------------------------------------------------------------------
  399. ;    P_KeyFile
  400. ;----------------------------------------------------------------------------
  401. ;----------------------------------------------------------------------------
  402. (PROCEDURE P_KeyFile
  403.  
  404. (SET #Dummy (TACKON (TACKON #ArchiveDir "Keyfile") #ApplicationKeyfile))
  405.  
  406. (if (<> (exists #Dummy (noreq)) 0) ((P_CopyDir "KeyFile"))
  407. )
  408. ) ;PROCEDURE
  409. ;----------------------------------------------------------------------------
  410. ;----------------------------------------------------------------------------
  411. ;    P_CopyArchiveIcon
  412. ;----------------------------------------------------------------------------
  413. ;----------------------------------------------------------------------------
  414. (PROCEDURE P_CopyArchiveIcon
  415.                    (COPYFILES
  416.     (SOURCE (CAT (CAT (TACKON #ArchiveDir "/") #ApplicationName) ".info"))
  417.     (DEST (TACKON #ApplicationDir "/"))
  418.     (HELP @copyfiles-help)
  419.                    )
  420. ) ;PROCEDURE
  421. ;----------------------------------------------------------------------------
  422. ;----------------------------------------------------------------------------
  423. ;    P_Rename
  424. ;----------------------------------------------------------------------------
  425. ;----------------------------------------------------------------------------
  426. (PROCEDURE P_Rename #Dummy #Dummy2
  427. (if (= (exists (TACKON #ApplicationDir #Dummy)) 2)
  428.         (rename (TACKON #ApplicationDir #Dummy) (TACKON #ApplicationDir #Dummy2))
  429. )
  430. ) ;PROCEDURE
  431. ;----------------------------------------------------------------------------
  432. ;----------------------------------------------------------------------------
  433. ;    MAIN
  434. ;----------------------------------------------------------------------------
  435. ;----------------------------------------------------------------------------
  436. (P_Requirements)
  437. (message (#App-installmsg #ApplicationName #ApplicationName #ApplicationName #ApplicationName))
  438. (welcome)
  439.  
  440.  (SET #ApplicationDir (P_GetApplicationDir #ApplicationDir))
  441.  
  442. (COMPLETE 1)
  443.  (P_Update)
  444.  (SET #Binary (P_AskBinary))
  445. (COMPLETE 2)
  446.  (SET #Language (P_AskCatalogs #Language))
  447. (COMPLETE 3)
  448.  (SET #Documents (P_AskDocs #Documents))
  449. (COMPLETE 4)
  450.  
  451. ;***** Delete old Data and Prefs
  452. (MAKEDIR #ApplicationDir (INFOS))
  453. (MAKEDIR (TACKON #ApplicationDir "Prefs") (INFOS))
  454. (DELETE (TACKON #ApplicationDir "BoulderDäsh.prefs"))
  455. (DELETE (TACKON #ApplicationDir "Prefs/BoulderDäsh.prefs"))
  456. (DELETE (TACKON #ApplicationDir "Games/BDash_I.Game"))
  457. (DELETE (TACKON #ApplicationDir "Scores/BDash_I.Game"))
  458. (DELETE (TACKON #ApplicationDir "SampleSets/Classic") (ALL))
  459.  (P_Rename "Graphics" "GraphicSets")
  460.  (P_Rename "Graphics.info" "GraphicSets.info")
  461.  (P_Rename "Fonts" "CharacterSets")
  462.  (P_Rename "Fonts.info" "CharacterSets.info")
  463. (COMPLETE 10)
  464.  (P_CopyDir "Games")
  465. (COMPLETE 40)
  466.  (P_CopyDir "Caves")
  467. (COMPLETE 45)
  468.  (P_CopyDir "SampleSets")
  469. (COMPLETE 65)
  470.  (P_CopyDir "Title")
  471. (COMPLETE 70)
  472.  (P_CopyDir "Scores")
  473. (COMPLETE 80)
  474.  (P_CopyDir "GraphicSets")
  475. (COMPLETE 90)
  476.  (P_CopyDir "CharacterSets")
  477. (COMPLETE 95)
  478.  (P_CopyBinary #ApplicationName)
  479.  (P_CopyFile (CAT #ApplicationName ".info"))
  480.  (P_CopyCatalogs #Language)
  481.  (P_CopyDocs #Documents)
  482.  
  483.  (P_CopyArchiveIcon)
  484.  (P_CopyFile "BoulderDäsh.info")
  485.  (P_CopyFile "Docs.info")
  486.  (P_CopyFile "CharacterSets.info")
  487.  (P_CopyFile "GraphicSets.info")
  488.  (P_Keyfile)
  489. (run "avail Flush")
  490. (COMPLETE 100)
  491. ;(exit #App-exit)
  492.